/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data.contact;

import data.email.EmailAddress;
import java.io.Serializable;
import java.util.Observable;
import javax.swing.event.DocumentListener;

/**
 *
 * @author Arcanis
 */
public class Contact extends Observable implements Serializable, IRecipient{    
    private EmailAddress address; //Primary Key, Unique
    private String name = ""; //Not Unique
    private String surname = ""; //Not Unique
    
    public Contact(EmailAddress address) {
        this.address = address;
    }        

    @Override
    public EmailAddress getAddress() {
        return address;
    }

    public String getName() {
        return name;
    }

    public String getSurname() {
        return surname;
    }

    public void setAddress(EmailAddress address) {
        this.address = address;
        setChanged();
    }

    public void setSurname(String surname) {
        this.surname = surname;
        setChanged();
    }

    public void setName(String name) {
        this.name = name;
        setChanged();
    }
    
    
    
}
